package com.niiwoo.civet.trade.service.local.loan.creditloan;

import com.niiwoo.civet.trade.dto.request.creditloan.MyCreditLoanRequestDTO;
import com.niiwoo.civet.trade.dto.response.MyCreditLoanResponseDTO;
import com.niiwoo.civet.trade.service.local.credit.CreditService;
import com.niiwoo.tripod.provider.dto.response.PageResponseDTO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @Description:
 * @Author:daizhiyue
 * @Date:2017/12/15
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class CreditLoanService {

    @Autowired
    CreditService creditService;

    @Test
    public void myCreditLoanQueryTest() {
        try {
            MyCreditLoanRequestDTO dto = new MyCreditLoanRequestDTO();
            dto.setUserId("425d4f6c-fd80-495c-89a3-0bfd2e369f66");

            PageResponseDTO<MyCreditLoanResponseDTO>  page = creditService.myCreditLoanQuery(dto);
            System.out.println(page.getItems().get(0));
        }catch (Exception e) {
            e.printStackTrace();
        }

    }
}